<!DOCTYPE html>
<html lang="en" class="no-js">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Home</title>
    <meta name="description" content=""/>
    <meta name="keywords" content=""/>
    <meta name="author" content="Themesdesign"/>

    <link rel="shortcut icon" href="images/favicon.ico">

    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">

    <!--Material Icon -->
    <link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css"/>

    <link rel="stylesheet" type="text/css" href="css/fontawesome.css"/>

    <!-- selectize css -->
    <link rel="stylesheet" type="text/css" href="css/selectize.css"/>

    <!--Slider-->
    <link rel="stylesheet" href="css/owl.carousel.css"/>
    <link rel="stylesheet" href="css/owl.theme.css"/>
    <link rel="stylesheet" href="css/owl.transitions.css"/>

    <!-- Custom  Css -->
    <link rel="stylesheet" type="text/css" href="css/style.css"/>

</head>

<body>
<!-- Loader -->
<div id="preloader">
    <div id="status">
        <div class="spinner">
            <div class="double-bounce1"></div>
            <div class="double-bounce2"></div>
        </div>
    </div>
</div>
<!-- Loader -->

<!-- Navigation Bar-->
<header id="topnav" class="defaultscroll scroll-active">
    <!-- Tagline STart -->
    <div class="tagline">
        <div class="container">
            <div class="float-left">
            </div>
            <div class="float-right">
                <ul class="topbar-list list-unstyled d-flex" style="margin: 11px 0px;">
                    <li class="list-inline-item" id="login-li"><a href="login.html"><i class="mdi mdi-account mr-2"></i>登录</a>
                    </li>
                    <li class="list-inline-item" id="signup-li"><a href="signup.html"><i
                            class="mdi mdi-account mr-2"></i>注册</a></li>
                    <li class="list-inline-item" id="username-li">
                        <a href="javascript:void(0);" id="username-a"></a>
                    </li>
                    <li class="list-inline-item" id="button-li">
                        <button class="btn btn-primary btn-sm" type="button" id="logout-btn">退出</button>
                    </li>
                </ul>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <!-- Tagline End -->

    <!-- Menu Start -->
    <div class="container">
        <!-- Logo container-->
        <div>
            <a href="index.html" class="logo">
                <img src="images/logo-light.png" alt="" class="logo-light" height="18"/>
                <img src="images/logo-dark.png" alt="" class="logo-dark" height="18"/>
            </a>
        </div>
        <div class="buy-button">
            <a href="post-a-job.html" class="btn btn-primary" id="post-job-a">
                <i class="mdi mdi-cloud-upload"></i>发布工作
            </a>
        </div><!--end login button-->
        <!-- End Logo container-->

        <div id="navigation">
            <!-- Navigation Menu-->
            <ul class="navigation-menu">
                <li><a href="index.html">主页</a></li>
                <li><a href="job-list.html">工作列表</a></li>
                <li class="has-submenu" id="my-page">
                    <a href="javascript:void(0)">个人中心</a><span class="menu-arrow"></span>
                    <ul class="submenu">
                        <li id="my-info" style="display: none;"><a href="create-resume.html">个人信息</a></li>
                        <li id="my-apply" style="display: none;"><a href="my-apply.html">我的申请</a></li>
                        <li id="my-job" style="display: none;"><a href="my-job.html">我的工作</a></li>
                        <li id="my-publish" style="display: none;"><a href="my-publish.html">我的发布</a></li>
                        <li id="my-employ" style="display: none;"><a href="my-employ.html">申请列表</a></li>
                        <li id="my-staff" style="display: none;"><a href="my-staff.html">我的员工</a></li>
                        <li id="job-manager" style="display: none;"><a href="job-manager.html">工作管理</a></li>
                        <li id="user-manager" style="display: none;"><a href="user-manager.html">用户管理</a></li>
                    </ul>
                </li>
                <li><a href="faq.html">公告</a></li>
            </ul><!--end navigation menu-->
        </div><!--end navigation-->
    </div><!--end container-->
    <!--end end-->
</header><!--end header-->
<!-- Navbar End -->

<!-- Start Home -->
<section class="bg-half" style="background: url('images/bg-home.jpg') center center;">
    <div class="bg-overlay"></div>
    <div class="home-center">
        <div class="home-desc-center">
            <div class="container">
                <div class="home-form-position">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="home-registration-form p-4 mb-3">
                                <form class="registration-form">
                                    <div class="row">
                                        <div class="col-lg-5 col-md-6">
                                            <div class="registration-form-box">
                                                <i class="fa fa-briefcase"></i>
                                                <input type="text" id="search-keyword"
                                                       class="form-control rounded registration-input-box"
                                                       placeholder="关键字">
                                            </div>
                                        </div>
                                        <div class="col-lg-5 col-md-6">
                                            <div class="registration-form-box">
                                                <i class="fa fa-list-alt"></i>
                                                <input type="text" id="search-company"
                                                       class="form-control rounded registration-input-box"
                                                       placeholder="用工单位">
                                            </div>
                                        </div>
                                        <div class="col-lg-2 col-md-6">
                                            <div class="registration-form-box">
                                                <input type="button" id="search-button" name="send"
                                                       class="submitBnt btn btn-primary btn-block" value="搜索">
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- end home -->

<!-- all jobs start -->
<section class="section bg-light">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-12">
                <div class="section-title text-center mb-4 pb-2">
                    <h4 class="title title-line pb-5">发现工作</h4>
                </div>
            </div>
        </div>
        <div class="row justify-content-center">
            <div class="col-lg-9 text-center mt-4 pt-2">
                <ul class="nav nav-pills nav nav-pills bg-white rounded nav-justified flex-column flex-sm-row"
                    id="pills-tab" role="tablist">
                    <li class="nav-item">
                        <a class="nav-link rounded active" id="recent-job-tab" data-toggle="pill" href="#recent-job"
                           role="tab" aria-controls="recent-job" aria-selected="true">最近发布</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link rounded" id="recommend-job-tab" data-toggle="pill" href="#recommend-job"
                           role="tab" aria-controls="featured-job" aria-selected="false">工作推荐</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <div class="tab-content mt-2" id="pills-tabContent">
                    <div class="tab-pane fade show active" id="recent-job" role="tabpanel" aria-labelledby="recent-job-tab">
                        <div class="row">
                            <div class="col-lg-12" id="recent-job-item-div">

                            </div>
                        </div>
                    </div>
                    <div class="tab-pane fade" id="recommend-job" role="tabpanel" aria-labelledby="recommend-job-tab">
                        <div class="row">
                            <div class="col-lg-12" id="recommend-job-item-div">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- end row -->
    </div>
    <!-- end containar -->
</section>
<!-- all jobs end -->

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">
                    提示
                </h4>
            </div>
            <div class="modal-body" id="warning-fade">
                按下 ESC 按钮退出。
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-info" data-dismiss="modal">关闭
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<hr>
<footer class="footer footer-bar">
    <div class="container text-center">
        <div class="row justify-content-center">
            <div class="col-12">
                <div class="">
                    <p class="mb-0">Copyright &copy; 2020.考文秋 All rights reserved.<a target="_blank" href=""></a></p>
                </div>
            </div>
        </div>
    </div><!--end container-->
</footer><!--end footer-->
<!-- Footer End -->

<!-- Back to top -->
<a href="#" class="back-to-top rounded text-center" id="back-to-top">
    <i class="mdi mdi-chevron-up d-block"> </i>
</a>
<!-- Back to top -->

<!-- javascript -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/jquery.easing.min.js"></script>
<script src="js/plugins.js"></script>

<!-- selectize js -->
<script src="js/selectize.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>

<script src="js/owl.carousel.min.js"></script>
<script src="js/counter.int.js"></script>

<script src="js/app.js"></script>
<script src="js/home.js"></script>

<script src="js/js.cookie.js"></script>
<script src="js/header-user.js"></script>
<script src="js/index.js"></script>

<script>
    // 申请工作
    function apply_job(jobId) {
        var role = Cookies.get("role");
        if(role == "COMPANY"){
            $("#warning-fade").html("用工单位不能申请工作！");
            $("#myModal").modal();
            return;
        }
        var userId = Cookies.get("userId");
        $.ajax({
            type: "post",
            url: "/work/applyJob",
            contentType: "application/json",
            dataType: "json",
            data: JSON.stringify({
                "applyUserId": userId,
                "jobId": jobId,
                "applyStatus": 1
            }),
            success: function (result) {
                $("#warning-fade").html(result.statusInfo);
                $("#myModal").modal();
            },
            error: function () {
                $("#warning-fade").html("服务请求失败！");
                $("#myModal").modal();
            }
        });
    }
</script>

</body>
</html>